package com.anyonavinfo.cpaddemo.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/** 时间转换工具*/
public class MusicPlayerTimeUtils {

	public static SimpleDateFormat sdf = new SimpleDateFormat();

	public static Date formateDate = new Date();

	public static String getFormattedTime(long timeMillis) {
		return getFormattedTime("mm:ss", timeMillis);
	}

	public static String getFormattedTime(String pattern, long timeMillis) {
		sdf.applyPattern(pattern);
		formateDate.setTime(timeMillis);
		return sdf.format(formateDate);
	}
}
